package com.qq.weixin.enums;

public enum MsgType {
  text("文本消息"), image("图片消息"), news("图文消息"), mpnews("图文消息-群发"), voice("语音消息"), video("视频消息"), shortvideo("小视频消息"), music("音东消息"), location(
      "地理位置消息"), link("链接消息"), event("事件消息");

  private String desc;

  private MsgType(String desc) {
    this.desc = desc;
  }

  public String getDesc() {
    return desc;
  }

  public static MsgType convert(String msgTypeStr) {
    try {
      return MsgType.valueOf(msgTypeStr);
    } catch (IllegalArgumentException e) {

    }
    return null;
  }

}
